<?php

class App extends Controller
{
	function App()
	{
		parent::Controller();
	}
	
	function logout()
	{
		// logout
		$this->simpleloginsecure->logout();
		$this->login();
	}
	
	function login()
	{
		$this->load->view('login/login.php');
	}
	
	function login_attempt()
	{
		$email = $this->input->post('email');
		$password = $this->input->post('password');
		// attempt to login
		if($this->simpleloginsecure->login($email, $password)) {
	    	redirect(site_url('welcome'));
		}
		else{
			$this->login();
		}
	}
}
?>